package com.xindaoapp.framework.api;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

import android.util.Pair;

import com.xindaoapp.framework.bean.AddressDetailInfo;
import com.xindaoapp.framework.bean.AddressInfo;
import com.xindaoapp.framework.bean.ConsigneeInfo;
import com.xindaoapp.framework.bean.InformMessage;
import com.xindaoapp.framework.bean.PrivateMessageInfo;
import com.xindaoapp.framework.bean.ReplyInfo;
import com.xindaoapp.framework.bean.ShoppingCartInfo;
import com.xindaoapp.framework.bean.UpdateInfo;
import com.xindaoapp.framework.utils.IRequest;

public interface MoccaApi {

	/**
	 * http://ts.leepet.com/plugins/API.v1.0/?&a=order&m=cartList
	 * http://bbs.chinapet.com/plugin.php?id=leepet_thread:api&action=indexPosts
	 */
	public static final String BASEURL = "http://bbs.chinapet.com/plugin.php?";

	public static final String SHOPBASEURL = "http://ts.leepet.com/plugins/API.v1.0/?&a=order&m=cartList";

	public static final String CHECKUPDATE = "http://www.chinapet.com/leepetphone/version.php";
	public static final String NEWATTACHMENTURL = "http://bbs.chinapet.com/plugin.php?id=leepet_thread:api&action=newattachment";
	public static final String INDEXPOSTSURL = "http://bbs.chinapet.com/plugin.php?id=leepet_thread:api&action=indexPosts";

	public static final String ACTION_MESSAGE_PRIVATE_LIST = "message_private_list";
	public static final String ACTION_MESSAGE_PRIVATE_SHOW = "message_private_show";
	public static final String ACTION_MESSAGE_SEND = "message_send";
	public static final String ACTION_MESSAGE_IGNORE = "message_ignore";
	public static final String ACTION_MESSAGE_DELETE = "message_delete";

	public static final String PARAM_MESSAGE = "message";
	public static final String PARAM_TOUID = "touid";
	public static final String PARAM_PMID = "pmid";
	public static final String PARAM_USERNAME_ = "username";
	public static final String PARAM_TOUSERNAME = "tousername";

	public static final String PARAM_ID = "id";
	public static final String PARAM_ACTION = "action";
	public static final String PARAM_TITLE = "title";
	public static final String PARAM_CONTENT = "content";
	public static final String PARAM_AIDLIST = "aidlist";
	public static final String PARAM_FILE = "file[%s]";
	public static final String PARAM_UID = "uid";
	public static final String PARAM_FID = "fid";
	public static final String PARAM_IMAGE = "img";
	public static final String PARAM_VIDEO = "video";
	/** 视频第一帧图片（上传视频的时候一块上传） */
	public static final String PARAM_VIDEOIMG = "video_img";
	public static final String PARAM_TYPE = "type";

	public static final String LEEPET_THREAD_API = "leepet_thread:api";
	public static final String INDEXPOSTS = "indexPosts";
	public static final String VIDEO = "video";
	public static final String IMG = "img";
	public static final String COVERIMG = "coverImg";
	public static final String PARAM_USERID = "userID";
	public static final String PARAM_NOTICEID = "notice_id";
	public static final String PARAM_PAGE = "page";
	public static final String PARAM_PAGESIZE = "pagesize";
	public static final String PARAM_RECID = "recID";
	public static final String PARAM_GOODSNUMBER = "goodsNumber";
	public static final String PARAM_ORDER_AMOUNT = "order_amount";
	public static final String PARAM_SHIPPING_FEE = "shipping_fee";
	public static final String PARAM_POSTSCRIPT = "postscript";
	public static final String DATA = "data";

	public static final String PARAM_PROVINCESID = "provincesID";
	public static final String PARAM_CITYID = "cityID";
	public static final String PARAM_AREAID = "areaID";
	public static final String PARAM_ADDRESS = "address";
	public static final String PARAM_USERNAME = "userName";
	public static final String PARAM_CODE = "code";
	public static final String PARAM_PHONE = "phone";
	public static final String PARAM_EMAIL = "email";
	public static final String PARAM_ADDRESSID = "addressID";

	public static final String STATUS = "status";
	public static final String ORDER_SN = "order_sn";
	public static final String ARRAY = "array";
	public static final String RESULT = "result";
	public static final String MSG = "msg";

	/**
	 * 发帖
	 * @param title
	 * @param content
	 * @param file
	 */
	public void publishPost(String uid, String jid, String title, String content, File[] files, String type,
			File videoimg, IRequest<Boolean> iRequest);

	/**
	 * 检查更新
	 * @param iRequest
	 */
	public void checkUpdate(IRequest<UpdateInfo> iRequest);

	/**
	 * 获取购物车列表
	 */
	public void getShoppingCart(String userId, IRequest<ArrayList<ShoppingCartInfo>> iRequest);

	/**
	 * 获取收货人信息
	 */
	public void getConsigneeCart(IRequest<List<ConsigneeInfo>> iRequest);

	/**
	 * 删除购物车
	 */
	public void deleteShoppingCart(String userId, String recID, IRequest<Boolean> iRequest);

	/**
	 * 修改购物车数量
	 */
	public void editCart(String userID, int goodsNumber, String recID,
			IRequest<Pair<Boolean, String>> iRequest);

	/**
	 * 添加收货地址
	 */
	public void addAddress(String userId, int provincesID, int cityID, int areaID, String address,
			String userName, String code, String phone, String email, String addressID,
			IRequest<Boolean> iRequest);

	/**
	 * 删除收货地址
	 * @param userID
	 * @param addressID
	 * @param iRequest
	 */
	public void deleteAddress(String userID, String addressID, IRequest<Boolean> iRequest);

	/**
	 * 修改收货地址
	 * @param userId
	 * @param provincesID
	 * @param cityID
	 * @param areaID
	 * @param address
	 * @param userName
	 * @param code
	 * @param phone
	 * @param email
	 * @param addressID
	 * @param iRequest
	 */
	public void editAddress(String userId, int provincesID, int cityID, int areaID, String address,
			String userName, String code, String phone, String email, String addressID,
			IRequest<Boolean> iRequest);

	/**
	 * 获取我的收货地址
	 * @param userID
	 * @param iRequest
	 */
	public void getMyAddress(String userID, IRequest<List<AddressInfo>> iRequest);

	/**
	 * 获取地址详细
	 * @param userID
	 * @param addressID
	 * @param iRequest
	 */
	public void getMyAddressDetail(String userID, String addressID, IRequest<AddressDetailInfo> iRequest);

	/**
	 * 设置默认收货地址
	 */
	public void setDefaultAddressDetail(String userID, String addressID, IRequest<Boolean> iRequest);

	/**
	 * 设置默认收货地址
	 */
	public void getDefaultAddress(String userID, IRequest<AddressDetailInfo> iRequest);

	/**
	 * 添加订单
	 */
	public void addOrder(String userID, String addressID, String recID, String order_amount,
			String shipping_fee, String postscript, IRequest<String> iRequest);

	/**
	 * 添加订单
	 */
	public void getCartList(String userID, IRequest<String> iRequest);

	/**
	 * 消息中心，回复
	 */
	public void getReplyList(String userID, int page, int pageSize, IRequest<List<ReplyInfo>> iRequest);

	/**
	 * 消息中心，通知
	 */
	public void getInformMessageList(String userID, int page, int pageSize,
			IRequest<List<InformMessage>> iRequest);

	/**
	 * 消息中心，通知
	 */
	public void deleteInformMessage(String notice_id, IRequest<Pair<Boolean, String>> iRequest);

	public void getPrivateMessageList(IRequest<List<PrivateMessageInfo>> iRequest);

	/**
	 * 获取我跟某个uid的对话详情列表
	 * @param touid
	 * @param iRequest
	 */
	public void getPrivateMessageListWithUid(String touid, IRequest<List<PrivateMessageInfo>> iRequest);

	/**
	 * 发送私信
	 */
	public void sendPrivateMessage(String username, String message, IRequest<Pair<Boolean, String>> iRequest);

	/**
	 * 忽略某人的消息
	 */
	public void ignorePrivateMessageWithUid(String username, IRequest<Pair<Boolean, String>> iRequest);

	/**
	 * 删除某人的消息
	 */
	public void deletePrivateMessageWithUid(String touid, String pmid,
			IRequest<Pair<Boolean, String>> iRequest);

	/**
	 * 获取运费
	 * @param recID
	 * @param provinceID
	 * @param iRequest
	 */
	public void getFreight(String recID, int provinceID, IRequest<Float> iRequest);

}
